﻿@model IEnumerable<VehicleManagement.Models.Message>

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Index</title>
</head>
<body>
    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
    <table>
        <tr>
            <th>
                ReceiverID
            </th>
            <th>
                ReceiverRole
            </th>
            <th>
                ReceiverName
            </th>
            <th>
                SenderID
            </th>
            <th>
                SenderRole
            </th>
            <th>
                SenderName
            </th>
            <th>
                SendTime
            </th>
            <th>
                MessageText
            </th>
            <th>
                IsChecked
            </th>
            <th>
                Remark
            </th>
            <th></th>
        </tr>
    
    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.ReceiverID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ReceiverRole)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ReceiverName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SenderID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SenderRole)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SenderName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SendTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MessageText)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsChecked)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Remark)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id=item.MessageID }) |
                @Html.ActionLink("Details", "Details", new { id=item.MessageID }) |
                @Html.ActionLink("Delete", "Delete", new { id=item.MessageID })
            </td>
        </tr>
    }
    
    </table>
</body>
</html>
